Electronic systems and circuits have made a significant contribution towards the advancement of modern society and are utilized in a number of applications to achieve advantageous results. Numerous electronic technologies such as digital computers, calculators, audio devices, video equipment, and telephone systems have facilitated increased productivity and reduced costs in analyzing and communicating data in most areas of business, science, education and entertainment. These activities often involve storage of information. The manner in which the electronic devices perform storage operations can have a significant impact on performance and end results. However, traditional attempts at information storage have many limitations and can be very complex and complicated.
Many traditional memory approaches attempt to utilize levels or tiers of memory storage including caches, system memory and bulk memory and with the utilization of multiple levels it is important to maintain information coherency. There are many traditional attempts at cache coherence protocols. Some common cache coherence protocols are organized around simple states that cache lines can be in and the transitions between those states.
In a traditional MESI coherence protocol, cache lines can be one of the following states: Modified, Exclusive, Shared or Invalid. In a Modified state the line is exclusive to a particular cache and has been modified since it was fetched. Upon eviction, the cache line needs to be written back to a home location (e.g. DRAM). In an Exclusive state the cache lines are exclusive to the cache that has them in this state and can thereafter be modified. As there is no modified data, nothing needs to be written back on eviction. In a Shared state the cache lines contain data that other agents may have and if they do, it is the same data. As there is no modified data, nothing needs to be written back on eviction. In an Invalid state the cache line contains no valid data. The line can be re-allocated at will.
There is also a traditional MOESI coherence protocol. In addition to the MESI states, the MOESI protocol introduces the ‘Owned’ state, which is similar to Shared state except that the line must be written back to the home location upon eviction. The Owned state arises when a line is modified in some cache, and another agent requests it as shared. In a MESI system, the line would be written back to backing store and simultaneously supplied to the agent requesting it shared and transition to shared from the modified state in the original cache. In a MOESI system, the line is not written back, it is just supplied to the agent requesting it shared, but transitions to owned so that the original agent remembers to essentially write it back, although it is no longer allowed to write to it, as it is (potentially) shared with other agents.
Each traditional coherence protocol often has strengths and weaknesses compared to another coherence protocol and traditional approaches of using one coherence protocol are limited in overall efficiency. The MESI protocol is usually simpler to implement, as an agent only needs to write back a line if it has modified it (as indicated by it being in the M state). If a line is modified, it can also be written to, as the line is guaranteed to be exclusive. In the MOESI protocol, an agent has to write back a line if the line has been modified, even if the line can no longer be written to because the line is now in the owned state. Thus, the MOESI protocol includes distinguishing a state (e.g., Owned, etc.) that needs to be written back even though no new writes can be accepted to a line in that state. There are more variants of both protocols.
The MOESI protocol can avoid utilizing as much DRAM bandwidth as the MESI protocol in some situations. For example, when two agents are communicating with one of them writing the data occasionally and the other merely asking for an updated copy, the MOESI protocol typically involves less write backs and consumes less bandwidth to DRAM than the MESI protocol. Typically, in the MESI protocol, every such request for an updated copy would cause the line to be written back to DRAM. In the MOESI protocol, usually only the final eviction of the line by an agent that had modified it would cause DRAM bandwidth to be utilized.